package com.oxygen.design.proxy;

import com.oxygen.design.proxy.interfaces.Image;
import com.oxygen.design.proxy.interfaces.impl.ProxyImage;

/**
 * @author wangjie
 * @title: CriteriaPatternDemo
 * @description: TODO
 * @date 2022/3/12 10:57 PM
 **/
public class ProxyPatternDemo {

    public static void main(String[] args) {
        Image image = new ProxyImage("test_10mb.jpg");

        // 图像将从磁盘加载
        image.display();
        System.out.println("");
        // 图像不需要从磁盘加载
        image.display();
    }

}
